<!doctype html>
<html class="no-js fixed-layout">
<head>
<% include("/common/shop_head.html"){}%>
</head>
<body>
<%include("/shop/header.html"){}%>
<div class="am-cf shop-main">
  <!-- sidebar start -->
  <%include("/shop/sidebar.html"){}%>
  <!-- sidebar end -->

  <!-- content start -->
  <div class="shop-content">
    <div class="shop-content-body">
      <ol class="am-breadcrumb am-margin-left am-margin-bottom-0">
        <li><span class="am-icon-shopping-bag am-icon-fw"> </span>交易信息</li>
        <li class="am-active">我的订单</li>
      </ol>
      
      
      <div class="am-panel am-panel-default am-text-xs am-margin-horizontal-sm">
        <div class="am-panel-bd am-g am-padding-0 am-scrollable-horizontal">
          <table class="am-table am-table-bordered am-table-striped am-table-hover am-text-nowrap am-text-xs am-margin-bottom-0">
            <thead>
              <tr>
                <th>订单编号</th>
                <th>下单时间</th>
                <th>订单金额</th>
                <th>订单状态</th>
                <th>商品名称</th>
              </tr>
            </thead>
            <tbody>
              <%for(list in pager.list){%>
              <tr>
                <td>
                  <a href="${base}/shop/order/view?id=${list.id}">${list.orderSn}</a>
                </td>
                <td>
                  <span title="${list.createDate,dateFormat="yyyy-MM-dd HH:mm:ss"}">${list.createDate,dateFormat="yyyy-MM-dd HH:mm:ss"}</span>
                </td>
                <td>
                  ${list.totalAmount,orderUnitCurrencyFormat}
                </td>
                <td>
                  <%if (list.orderStatus != "processed" && list.orderStatus != "unprocessed"){%>
                  <span class="am-badge am-badge-primary">${i18n("OrderStatus." + list.orderStatus)}</span>
    			  <%}%>
                  <span class="am-badge am-badge-secondary">${i18n("PaymentStatus." + list.paymentStatus)}</span>
                  <span class="am-badge am-badge-success">${i18n("ShippingStatus." + list.shippingStatus)}</span>
                </td>
                <td>
			      <a href="${base}/shop/order/view?id=${list.id}">
                    <div class="am-text-truncate shop-text-truncate-order-product-name"  data-am-popover="{theme: 'secondary sm', content: '<%for(listProduct in list.orderItemList!){%><%if(listProductLP.index != 1){%><br><%}%>${listProduct.productName}<%}%>', trigger: 'hover focus'}">
                    <%for(listItem in list.orderItemList!){%>
                    <%if(listItemLP.index != 1){%>、<%}%>
                    ${listItem.productName}
                    <%}%>
                    </div>
                  </a>
				</td>
			  </tr>
			  <%}%>
            </tbody>
          </table>
          <%if (pager.list.~size == 0){%>
          <div class="am-kai am-text-center am-margin">
            <h3>没有找到任何记录!</h3>
          </div>
          <%}%>
        </div>
      </div>
      <%include("/shop/pager.html", {"pageNumber":pager.pageNumber,"pageSize":pager.pageSize,"pageCount":pager.totalPage,"property":"","keyword":"无","orderBy":"","orderType":"","baseUrl":"/shop/order/list"}) {}%>
    </div>
    <%include("/shop/footer.html"){}%>
  </div>
  <!-- content end -->
</div>
</body>
</html>